package com.hzhc.controller.yworder;

import com.hzhc.common.BaseController;
import com.hzhc.entity.CntrImgFile;
import com.hzhc.enumBean.ResultUtilCodeEnum;
import com.hzhc.service.CntrImgFileService;
import com.hzhc.utils.ResultUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 箱图片
 * </p>
 *
 * @author 功不唐捐
 * @since 2024-05-23
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/cntrImgFile")
public class CntrImgFileController extends BaseController {

    private final CntrImgFileService cntrImgFileService;

    /**
     * 获取箱子的上传图片列表
     */
    @RequestMapping("/getCntrImgFileList")
    @ResponseBody
    public ResultUtil<List<CntrImgFile>> getCntrImgFileList(@RequestBody CntrImgFile cntrImgFile) {
        List<CntrImgFile> cntrSizes = cntrImgFileService.getCntrImgFileList(cntrImgFile);
        return ResultUtil.build(cntrSizes, ResultUtilCodeEnum.SUCCESS);
    }
}
